#ifndef __IIC_H
#define __IIC_H

#include "main.h"


#define	SDA	 	P23		//SDA
#define	SCL		P24		//SCL



void IIC_Init(void);

void IIC_Start(void);
void IIC_Stop(void);
void IIC_SendAck(bit ack);

void IIC_SendOneByte(uint8_t BYTE);
uint8_t IIC_ReceiveOneByte(void);

void IIC_WriteOneByte(uint8_t add, uint8_t reg, uint8_t DATA);
void IIC_ReadBytes(uint8_t add, uint8_t reg, uint8_t * buf, uint8_t len);
#endif
